export function getThumbnailUrl(url) {
  const array = url.split('?')
  if (/\.(mp4|avi|wmv|mpg|mpeg|mov|rm|ram|swf|flv)/.test(array[0])) {
    return `${array[0]}?vframe/jpg/offset/3/w/480/h/360&${array[1]}`
  }
  return url
}
export function getVideoUrl(url) {
  const array = url.split('?')
  if (/\.(mp4|avi|wmv|mpg|mpeg|mov|rm|ram|swf|flv)/.test(array[0])) {
    console.log(array)
    const params = array[1].split('&')
    const target = `${array[0]}?${params[2]}&${params[3]}`
    console.log(target)
    return target
  }
  return url
}
